this.add_child(this._controls);
}
+ animateToOverview(callback) {
+ this._controls.animateToOverview();
+
+ this.opacity = 0;
+ this.ease({
+ opacity: 255,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: ANIMATION_TIME,
+ onStopped: () => {
+ if (callback)
+ callback();
+ },
+ });
+ }
+
+ animateFromOverview(callback) {
+ this._controls.animateFromOverview();
+
+ this.ease({
+ opacity: 0,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ duration: ANIMATION_TIME,
+ onStopped: () => {
+ if (callback)
+ callback();
+ },
+ });
+ }
+
get dash() {
return this._controls.dash;
}
this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
Meta.disable_unredirect_for_display(global.display);
- this.viewSelector.animateToOverview();
- this._overview.opacity = 0;
- this._overview.ease({
- opacity: 255,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: ANIMATION_TIME,
- onComplete: () => this._showDone(),
- });
+ this._overview.animateToOverview(() => this._showDone());
Main.layoutManager.overviewGroup.set_child_above_sibling(
this._coverPane, null);
this._animationInProgress = true;
this._visibleTarget = false;
- this.viewSelector.animateFromOverview();
-
- // Make other elements fade out.
- this._overview.ease({
- opacity: 0,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: ANIMATION_TIME,
- onComplete: () => this._hideDone(),
- });
+ this._overview.animateFromOverview(() => this._hideDone());
Main.layoutManager.overviewGroup.set_child_above_sibling(
this._coverPane, null);